<?php
include_once("../modules/checkA.php");
include_once("../../config.php");
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'menu'");


?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("select_datas.php");

$meal['1']="早餐";
$meal['2']="午餐";
$meal['3']="晚餐";

?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include_once(ROOT_PATH_.'/controlbase/modules/head.php'); ?>
</head>

<body>

<div id="topbar"><?php include ROOT_PATH_.'/controlbase/modules/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controlbase/modules/sidebar.php'; ?>
        </div>


<div id="content" class="layui-form">
<h1> 菜单列表 </h1>







    <div class="select-box layui-form">
        <form action="detail-list.php?nav-itemed=order" >

            <div class="layui-form-item">
                <label class="layui-form-label">关键词</label>
                <div class="layui-input-block">
                    <input type="text" name="select_keywords" placeholder="可搜索姓名，备注，身份证，电话" autocomplete="off" class="layui-input" value="<? echo $_REQUEST['select_keywords']?>" >
                </div>
            </div>











            <div class="layui-form-item">
                <label class="layui-form-label">时间</label>

                <div class="layui-input-block">
                    <input type="text" name="select_startday" placeholder="请输入开始时间" autocomplete="off" class="layui-input"  onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="float: left; width: 112px" value="<?if($_REQUEST['select_startday']){echo $_REQUEST['select_startday'] ;} ?>" >

                    <span style="float: left;margin: 0 4px; line-height: 30px;">-</span>


                    <input type="text" name="select_endday" placeholder="请输入结束时间" autocomplete="off" class="layui-input" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"  style="float: left; width:112px" value="<?if($_REQUEST['select_endday']){echo $_REQUEST['select_endday'] ;} ?>"  >


                    <input type="hidden" name="nav-itemed"  value="member" >


                </div>


            </div>


            <br class="clearfloat"/>


            <button class="layui-btn">查找</button>
            <a href="detail-list.php?nav-itemed=order" class="layui-btn" lay-submit lay-filter="formMemberAdd" >清除</a>


<!--            <a class="layui-btn" href="export-member-list-by-search.php?nowpageid=--><?//echo $url_str?><!--" target="_blank">导出当前数据</a>-->
<!---->

            <br class="clearfloat"/>
        </form>

        <br class="clearfloat"/>

        <hr/>
    </div>





<!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
<div class="list-box">

 <a href="detail-add.php" class="layui-btn" lay-submit lay-filter="formMemberAdd" >新增</a>

<div class="list-boxes">








<table class="layui-table">
  <colgroup>
    <col width="60">
    <col width="100">
	<col >
	<col >
	<col >
	<col >
      <col width="220">

  </colgroup>
  <thead>
    <tr>
      <th>序号</th>
      <th>菜式名</th>
      <th>日期</th>
      <th>时段</th>
      <th>价格</th>
      <th>状态</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>

  <?php

  if ($detailnum == 0) {
      echo "<tr><td colspan='8'>暂无数据</td></tr>";
  }

  ?>




	<?php
	for ($i = 0; $i < $detailnum; $i++) {
    ?>

      <tr id="item<?echo $detail[$i]['product_id']?>" >
      <td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>



          <td><?echo $detail[$i]['name']?></td>


          <td><?echo $detail[$i]['applydate']?></td>

	  <td><?echo $meal[$detail[$i]['meal']]?></td>
	  <td><?echo $detail[$i]['price']?></td>
	  <td><?echo $detail[$i]['status']?></td>
	  <td>



          <a href="detail-edit.php?nav-itemed=<?echo $system_part?>&nid=<? echo $detail[$i]['product_id']?>&nowpageid=<?echo $nowpageid?>" class="layui-btn layui-btn-primary layui-btn-small" >
              <i class="layui-icon">&#xe642;</i>修改
          </a>


  <a href="javascript:void(0)" onclick="delItem (<?php echo $detail[$i]['product_id']?>)" class="delete layui-btn layui-btn-primary layui-btn-small" >删除 <i class="layui-icon">&#xe640;</i> </a>




  </td>
    </tr>
  <?php

}
?>


  </tbody>
</table>






</div>



    <div class="list-box-function"
        <? if ($detailnum == 0) {
            echo "style" . "='display:none'";
        } ?>
        >

        <?php include 'page_numbers.php'; ?>

    </div>
</div>


<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>







<!--删除box-->
<?php include '../modules/deletebar.php'; ?>
<!--删除box end-->

<?php include_once('../modules/footer.php'); ?> </body>
</html>
